<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox-content">
					<form class="form-horizontal m-t" id="fm">
						<input id="usrsId" name="usrsId" th:value="${user.usrsId}"
							type="hidden">
						<div class="form-group">
							<label class="col-sm-3 control-label">账号：</label>
							<div class="col-sm-8">
								<input id="account" name="account" class="form-control"
									type="text" th:value="${user.account}" readonly>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">昵称：</label>
							<div class="col-sm-8">
								<input id="nickname" name="nickname" class="form-control" type="text"
									th:value="${user.nickname}" readonly>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">手机号码：</label>
							<div class="col-sm-8">
								<input id="tel" name="tel" class="form-control" type="text"
									th:value="${user.tel}" readonly>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">充值金额：</label>
							<div class="col-sm-8">
								<input id="recharge" name="recharge" class="form-control" type="text">
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-8 col-sm-offset-3">
								<button type="button" onclick="addRecharge()" class="btn btn-primary">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript">
	function addRecharge() {
		$.ajax({
			cache : true,
			type : "POST",
			url : "/partner/users/recharge",
			data : $('#fm').serialize(),// 你的formid
			async : false,
			error : function(request) {
				alert("Connection error");
			},
			success : function(data) {
				if (data.code == 0) {
					parent.layer.msg(data.msg);
					parent.reLoad();
					var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
					parent.layer.close(index);
	
				} else {
					parent.layer.msg(data.msg);
				}
	
			}
		});
	}
	</script>
</body>
</html>
